<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Delete</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.studio.doc/html/style/style.css"/>
	</head>
	<body>
		<h1 id="delete">Delete</h1>
		<p>The extension point is provided by:</p>
		<ul>
			<li>the plug-in org.polarsys.capella.core.model.handler</li>
			<li>and its identifier deleteCommandProvider.</li>
		</ul>
		<p>The contribution to the extension point is done in the plugin.xml file of the plugin. Open this file and focus on the plugin.xml tab:</p>
		<pre class="language-xml"><code class="language-xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;?eclipse version="3.4"?&gt;
&lt;extension point="org.polarsys.capella.common.menu.dynamic.MDEMenuItemContribution"&gt;
  &lt;MDEMenuItemContribution
            class=""
            id=""&gt;
  &lt;/MDEMenuItemContribution&gt;
&lt;/extension&gt;</code></pre>
		<h3 id="detail-of-the-different-fields">Detail of the different fields</h3>
		<ul>
			<li>
				<code>class</code>: a java class inheriting of 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.model.handler/src/org/polarsys/capella/core/model/handler/command/IDeleteHelper.java" target="_blank">org.polarsys.capella.core.model.handler.command.IDeleteHelper</a>
			</li>
			<li>
				<code>id</code>: an unique identifier for the contribution
			</li>
		</ul>
		<h2 id="sample">Sample</h2>
		<p>When we delete an element, we need to delete its reference into any REC/RPL. </p>
		<ul>
			<li>The 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.re/src/org/polarsys/capella/core/re/delete/ReDeleteHelper.java" target="_blank">Java class</a> defining the contribution
			</li>
			<li>Its registration within 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.re/plugin.xml#L423" target="_blank">plugin.xml</a>
			</li>
			<li>In 
				<a href="https://github.com/eclipse-capella/capella/blob/master/core/plugins/org.polarsys.capella.core.re/META-INF/MANIFEST.MF#L18" target="_blank">MANIFEST/MANIFEST.MF</a> file we need to depend on 
				<code>org.polarsys.capella.core.model.handler</code> 
			</li>
		</ul>
	</body>
</html>